#ifndef GAMESERVER_H
#define GAMESERVER_H

#include "SocketServer.h"

class GameServer
    : public SocketServer
{
public : // ITcpServer implementation
    
    bool OnConnected(    SOCKET client );
    
    void OnDisconnected( SOCKET client );
    
    bool OnRead(
              SOCKET client,
        const char *     data,
              unsigned   size,
              unsigned & processed
    );

public :
     
     GameServer( void );
    ~GameServer( void );

private :

    enum EEvent {
        EE_CONNECTED    = 0,
        EE_DISCONNECTED = 1,
        EE_ON_READ      = 2,

        EE_COUNT,
    };
    
    void PrintOut(
        EEvent            event,
        SOCKET            client,
        Message::Packet * packet = NULL
    );
};

#endif